//
//  ImageTableViewCell.m
//  Homework_10
//
//  Created by 徐昊 on 16/7/27.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "ImageTableViewCell.h"
#import "UIView+Frame.h"

@interface ImageTableViewCell ()
@property (nonatomic, strong) UIImageView *leftImage;
@property (nonatomic, strong) UIImageView *middleImage;
@property (nonatomic, strong) UIImageView *rightImage;
@end
@implementation ImageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _leftImage = [[UIImageView alloc] init];
        _leftImage.backgroundColor = [UIColor blackColor];
        [self.contentView addSubview:_leftImage];
        _middleImage = [[UIImageView alloc] init];
        _middleImage.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_middleImage];
        _rightImage = [[UIImageView alloc] init];
        _rightImage.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_rightImage];
    }
    return self;
}
- (void)layoutSubviews {
    _leftImage.frame = CGRectMake(5, 5, (self.contentView.h_width - 20) / 3, self.contentView.h_height - 10);
    _middleImage.frame = CGRectMake( (self.contentView.h_width - 20) / 3 + 10, 5,  (self.contentView.h_width - 20) / 3, self.contentView.h_height - 10);
    _rightImage.frame = CGRectMake( (self.contentView.h_width - 20) / 3 * 2 + 15, 5,  (self.contentView.h_width - 20) / 3, self.contentView.h_height - 10);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
